var express = require('express');
var router = express.Router();
var dao = require('./common/db')

/* GET home page. */
router.get('/', function(req, res, next) {
  res.render('index', { title: 'Express' });
});

router.get('/query', async function(req, res, next) {
    let data = await dao.query({id:1}, 'users')
    res.json(data)
});

module.exports = router;
